package com.iterator.controller.web.marketManager;

import com.iterator.bean.web.dhy.RegionListVO;
import com.iterator.bean.web.dhy.TestInsertInfoBO;
import com.iterator.bean.web.pojo.BaseRespVo;
import com.iterator.service.web.marketManager.MallManageService;
import com.iterator.service.web.marketManager.TestInsertInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: DHY
 * @Date: 2021/1/10 22:03
 * @Description: 商场管理  行政区域
 */
@RestController
@RequestMapping("admin/region")
public class RegionController {
    @Autowired
    TestInsertInfo insertInfo;
    @Autowired
    MallManageService mallManageService;

    /**
     * 行政图区域显示
     * @return
     */
    @GetMapping("list")
    public BaseRespVo regionList() {
        List<RegionListVO> regionListVO=mallManageService.regionList();
        return BaseRespVo.ok(regionListVO);
    }




    /**
     * 批量插入数据表
     * @param bo
     */
    @PostMapping("dhy/insert")
    public BaseRespVo insertInfo(@RequestBody TestInsertInfoBO bo){
        insertInfo.insertInfo(bo);
        return BaseRespVo.ok();
    }
}
